{extend name="common:frm_base" /}
{block name="content"}
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">调整订单状态</div>
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="{:url('order/handle')}" lay-filter="component-form-group">
                <div class="layui-form-item">
                    <label class="layui-form-label">选择状态</label>
                    <div class="layui-input-inline">
                        <select name="status" lay-verify="required" lay-filter="bus_list">
                            <option value="">请选择状态</option>
                            {foreach o_status as $key=>$val}
                                <option value="{$key}" {if $status == $key}selected{/if} >{$val}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>

                <div class="layui-form-item" id="bus" {if $info['bus_id']==0}style="display:none;"{/if}>
                    <label class="layui-form-label">车队列表</label>
                    <div class="layui-input-inline">
                        <select name="shop_id">
                            <option value="">请选择车队</option>
                            {foreach $bus_list as $key=>$val}
                            <option {if $val['id']==$info['bus_id']}selected{/if} value="{$val.id}">{$val.nick_name}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
                {:token()}
                <input type="hidden" value="order_status" name="act" />
                <input type="hidden" value="{$order_id|default=''}" name="order_id" />
                <div class="layui-form-item layui-hide">
                    <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit" value="确认">
                </div>
                <!--<div class="layui-form-item layui-layout-admin">-->
                <!--<div class="layui-input-block">-->
                <!--<div class="layui-footer" style="left: 0;">-->
                <!--<button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">立即提交</button>-->
                <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
            </form>
        </div>
    </div>
</div>

<script>
    layui.config({
        base: '__LAYUIADMIN__/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate', 'upload'], function(){
        var $ = layui.$
            ,admin = layui.admin
            ,element = layui.element
            ,layer = layui.layer
            ,laydate = layui.laydate
            ,form = layui.form
            ,upload = layui.upload;

        form.on('select(bus_list)', function(data){
           if(data.value==1){
               $('#bus').show();
           }else{
               $('#bus').hide();
           }
        });


    });

    function openImg(i) {
        layer.photos({
            photos: '#pic-list'
        });
    }
</script>
{/block}